package top.happylaishop.shop.service;

import top.happylaishop.shop.dto.CartDto;
import top.happylaishop.shop.dto.UpdateCartProductDto;
import top.happylaishop.shop.dto.UserDto;
import top.happylaishop.shop.pojo.Cart;
import top.happylaishop.shop.utils.resp.RestResponse;

import java.util.List;

public interface CartService {

    RestResponse<CartDto> add(UpdateCartProductDto updateCartProductDto);
    RestResponse<CartDto> update(UpdateCartProductDto updateCartProductDto);
    RestResponse<CartDto> deleteProduct(UserDto userDto, String productIds);

    CartDto list(Integer userId);
    RestResponse<CartDto> selectOrUnSelect(UserDto userDto, Integer productId, Integer checked);

    RestResponse<Integer> getCartProductCount(Integer userId);

    RestResponse<CartDto> changeAllSelectedStatus(UserDto currentUserInfo, Integer checked);

    List<Cart> listSelected(Integer userId);

    int deleteByIds(List<Integer> idList);
}
